﻿@using Seal.Model;
@{
    ReportViewTemplate Template = Model;
    Template.Description = "Main view to display a model.\r\nIts view children are dedicated to view each part of the model result: Page tables, Data tables, Charts, KPI.";

    //If true, the view can be configured for a report model
    Template.ForReportModel = true;

    //Parameters for this template
    Template.Parameters.Add(new Parameter() { Name = "show_summary_table", DisplayName = "Display: Show summary table", BoolValue = true, Description = "If true, the summary table created when the model has several pages is displayed." });
    Template.Parameters.Add(new Parameter() { Name = "show_page_tables", DisplayName = "Display: Show page tables", BoolValue = true, Description = "If true, the page tables created when the model has several pages are displayed." });
    Template.Parameters.Add(new Parameter() { Name = "show_data_tables", DisplayName = "Display: Show data tables", BoolValue = true, Description = "If true, the data tables are displayed." });
    Template.Parameters.Add(new Parameter() { Name = "show_charts", DisplayName = "Display: Show Charts", BoolValue = true, Description = "If true, the charts are displayed." });
    Template.Parameters.Add(new Parameter() { Name = "show_page_separator", DisplayName = "Display: Show page separator", BoolValue = false, Description = "If true, a separator if displayed between each pages of the model" });
    Template.Parameters.Add(new Parameter() { Name = Parameter.ServerPaginationParameter, DisplayName = "Options: Server pagination enabled", BoolValue = true, Description = "If true and the parameter of the root 'Report View' parameter is also true, data used by HTML data tables pagination are stored on the server." });
    Template.Parameters.Add(new Parameter() { Name = "model_class", DisplayName = "Model: CSS Class", Description = "CSS class attribute main model DIV.", Enums = new string[] { "alert alert-info", "alert alert-success" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "model_css", Value = "margin-top:5px;", DisplayName = "Model: CSS Style", Description = "CSS style attribute main model DIV.", Enums = new string[] { "margin: 10px;", "padding: 10px;", "margin-top:5px;border:solid 1px grey;border-radius:5px;" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "model_menu_type", DisplayName = "Multiple pages: Menu type", Value = "top", Enums = new string[] { "top|Top Menu", "left|Left Menu", "right|Right Menu", "none|List (No Menu)" }, Description = "The style of the layout when the model has several pages: Either a menu on the Top, Left, Right or a simple list." });
    Template.Parameters.Add(new Parameter() { Name = "model_menu_style", DisplayName = "Multiple pages: Menu style", Value = "pill", Enums = new string[] { "tab|Tabs", "pill|Pills" }, Description = "The style of the menu when the model has several pages: Pills or Tabs." });
    Template.Parameters.Add(new Parameter() { Name = "model_menu_justified", DisplayName = "Multiple pages: Menu justified", BoolValue = false, Description = "If true, menu tabs or pills have equal widths." });
    Template.Parameters.Add(new Parameter() { Name = "model_menu_width", DisplayName = "Multiple pages: Menu width", NumericValue = 3, Description = "For Left or Right menu, the width of the column between 1 and 11 on 12 spans (default is 3)." });
    Template.Parameters.Add(new Parameter() { Name = "model_menu_index", DisplayName = "Multiple pages: Menu selected index", NumericValue = 0, Description = "The index of Menu selected when the report is loaded." });
    Template.Parameters.Add(new Parameter() { Name = "model_show_count", DisplayName = "Multiple pages: Show number of records", BoolValue = false, Description = "If true, the number of records of the table is added to the page title." });
    Template.Parameters.Add(new Parameter() { Name = "summary_table_caption", DisplayName = "Summary table: Caption", Description = "Optional caption or title displayed at the bottom of the summary table." });
    Template.Parameters.Add(new Parameter() { Name = "summary_table_caption_css", DisplayName = "Summary table: Caption CSS Style", Value = "text-align:center;", Description = "CSS style attribute of the table caption.", Enums = new string[] { "caption-side:bottom; text-align:center;", "caption-side:top; text-align:right; font-weight:bold;" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "summary_table_class", Value = "table table-striped table-hover table-bordered", DisplayName = "Summary table: CSS Class", Description = "CSS class attribute of the table.", Enums = new string[] { "table table-striped table-hover table-bordered table-responsive table-condensed" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "summary_table_css", Value = "margin-top:5px;width:auto;min-width:50%;", DisplayName = "Summary table: CSS Style", Description = "CSS style attribute of the table.", Enums = new string[] { "margin: 10px;", "padding: 10px;" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "summary_header_class", Value = "active", DisplayName = "Summary table: Header row CSS class", Description = "CSS class attribute of the header rows.", Enums = new string[] { "active", "success", "info", "warning", "danger" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "summary_header_css", Value = "", DisplayName = "Summary table: Header row CSS Style", Description = "CSS style attribute of the header rows.", Enums = new string[] { "color:red;font-size:15pt;" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "summary_body_class", Value = "", DisplayName = "Summary table: Body row CSS class", Description = "CSS class attribute of the body rows.", Enums = new string[] { "success", "info", "warning", "danger" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "summary_body_css", Value = "", DisplayName = "Summary table: Body row CSS Style", Description = "CSS style attribute of the body rows.", Enums = new string[] { "color:red;font-size:15pt;" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "summary_footer_class", Value = "active tr-totals", DisplayName = "Summary table: Footer row CSS class", Description = "CSS class attribute of the footer rows.", Enums = new string[] { "success", "info", "warning", "danger" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "summary_footer_css", Value = "", DisplayName = "Summary table: Footer row CSS Style", Description = "CSS style attribute of the footer rows.", Enums = new string[] { "color:red;font-size:15pt;" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "display_summary_totals", DisplayName = "Summary table: Display totals", BoolValue = true, Description = "If true, the totals are displayed in the summary table." });
    Template.Parameters.Add(new Parameter() { Name = "add_summary_totals_totals", DisplayName = "Summary table: Add a total of totals line", BoolValue = true, Description = "If true, a line containing the totals is added at the end of the summary table" });
    Template.Parameters.Add(new Parameter() { Name = Parameter.ForceExecutionParameter, DisplayName = "View Restrictions: Force execution", BoolValue = false, Description = "If true and the model has a prompted View Restriction, it will be executed and display the first time the report is executed." });
    Template.Parameters.Add(new Parameter() { Name = Parameter.ForceRefreshParameter, DisplayName = "View Restrictions: Force refresh", BoolValue = false, Description = "If true, the model will be refreshed when a View Restriction triggers an execution, even if the model has no restriction involved in the View Restriction." });
    Template.Parameters.Add(new Parameter() { Name = Parameter.DrillEnabledParameter, DisplayName = "Navigation: Drill enabled", BoolValue = true, Description = "If true, the Drill navigation is enabled in this model if enabled in the root view" });
    Template.Parameters.Add(new Parameter() { Name = Parameter.NavigationView, Type = ViewParameterType.RootReportView, DisplayName = "Navigation: Drill View ", Description = "View executed when a drill navigation occurs. If empty, the current root view of is used." });
    Template.Parameters.Add(new Parameter() { Name = Parameter.SubReportsEnabledParameter, DisplayName = "Navigation: Sub-Reports enabled", BoolValue = true, Description = "If true, the Sub-Reports navigation is enabled for this model if enabled in the root view" });
    Template.Parameters.Add(new Parameter() { Name = Parameter.NVD3AddNullPointParameter, DisplayName = "Chart Series: Add points with Null", BoolValue = true, Description = "If true, a point having an Y value equals to NULL will be inserted in the Serie with a 0 value; otherwise no point is inserted (Warning: missing points may cause JavaScript NVD3 errors for certain chart types like Bar, StackedArea, etc...)." });
    Template.Parameters.Add(new Parameter() { Name = "print_break_after_page", DisplayName = "Print: Force a break after a page", BoolValue = false, Description = "If true, a new page is started after a page is displayed for the print layout." });

    //Allowed template parent names
    Template.ParentNames = new List<string>() { "Report", "Tab Page", "Container", "Container Grid Flex", "Widget" };
}
